package minidb.parse.exps;

public class Table
{
	public String tableName;
	public SelectExp selectExp;
	
	public Table(String tn)
	{
		this.tableName=tn;
		this.selectExp=null;
	}
	
	public Table(String tn,SelectExp selectExp)
	{
		this.tableName=tn;
		this.selectExp=selectExp;
	}
	
	public String Print()
	{
		if(this.selectExp==null)
			return this.tableName;
		else
			return "("+this.selectExp.Print()+") AS "+this.tableName;
	}
}
